<template>
      <div class="view-cnt">

          <div class="list-item">名称：<el-input v-model="introduction.nname" placeholder="请输入名称" style="width: 30%"></el-input></div>
          <div class="list-item">地址：<el-input v-model="introduction.address" placeholder="请输入地址" style="width: 30%"></el-input></div>
          <div class="list-item">电话：<el-input v-model="introduction.phone" placeholder="请输入电话" style="width: 30%"></el-input></div>
          <div class="list-item">网址：<el-input v-model="introduction.internet" placeholder="请输入网址" style="width: 30%"></el-input></div>
          <div class="list-item">邮箱：<el-input v-model="introduction.email" placeholder="请输入邮箱" style="width: 30%"></el-input></div>
          <el-button type="primary" @click="updateIntro">保存</el-button>
          </div>

</template>
<script>
import Nav from "./components/nav"
export default {
    components:{
        Nav
    },
    data(){
        return {
            introduction: {
                id: '',
                nname:'',
                phone: '',
                email: '',
                address:'',
                internet: '',

            }

        }
    },
    mounted() {
        this.getIntroduction();
    },
    created(){

    },
    methods:{
        getIntroduction(){
            this.centralControl.axios.centralControl(
                'getIntroduction',
                res => {
                    this.introduction=res;
                },
                {}
            );
        },
        updateIntro(){
            this.centralControl.axios.centralControl(
                'updateIntroduction',
                res => {
                    this.$message({
                        message: '更新联系信息成功',
                        type: 'success'
                    });
                    this.$router.push("/contactUs")
                },
                this.introduction
            );
        }

    }
}
</script>
<style lang="less" scoped>
.right-nr {
    font-size: 16px;
    color: #666;
    position: relative;
    padding-bottom: 50px;
}
.view-cnt {
    margin-top: 10px;
    line-height: 29px;
}
.view-cnt p {
    text-align: justify;
    margin: 10px 0;
    text-justify: inter-ideograph;
}
</style>
